<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="../header.jsp"%>
<!-- start content-outer -->
<div id="content-outer">
    <!-- start content -->
    <div id="content">
        <script>
                                        function validateForm()
                                        {                                            
                                                                                        
                                            var namaKegiatan = true, tahun= true, tingkat= true, prestasiDicapai= true, uploadSertifikat= true;
                                            
                                            if(document.frm.namaKegiatan.value=="")
                                            {                                                
                                                document.getElementById("namaKegiatan_error").innerHTML="<div class='error-left'></div><div class='error-inner'>Judul Publikasi Karya Belum Terisi.</div>";
                                                namaKegiatan = false;
                                            } else {
                                                document.getElementById("namaKegiatan_error").innerHTML="";       
                                            }
                                            
                                            if(document.frm.tahun.value=="0")
                                            {                                                
                                                document.getElementById("tahun_error").innerHTML="<div class='error-left'></div><div class='error-inner'>Tempat Publikasi Belum Terisi.</div>";
                                                tahun= false;
                                            } else {
                                                document.getElementById("tahun_error").innerHTML="";
                                            }                                                   
                                            
                                            if(document.frm.tingkat.value=="0")
                                            {
                                                document.getElementById("tingkat_error").innerHTML="<div class='error-left'></div><div class='error-inner'>Tahun Publikasi Belum Dipilih.</div>";
                                                tingkat= false;
                                            } else {
                                                document.getElementById("tingkat_error").innerHTML="";
                                            }    
                                            
                                            if(document.frm.prestasiDicapai.value=="")
                                            {                                                
                                                document.getElementById("prestasiDicapai_error").innerHTML="<div class='error-left'></div><div class='error-inner'>Jumlah Peneliti Belum Terisi.</div>";
                                                prestasiDicapai= false;
                                            } else {
                                                document.getElementById("prestasiDicapai_error").innerHTML="";
                                            }
                                            
                                            if(namaKegiatan && tahun && tingkat && prestasiDicapai && uploadSertifikat){
                                                return true;
                                            }else{
                                                return false;
                                            }
        
                                        }
                                    </script>

        <div id="page-heading"><h1>Ubah Prestasi Mahasiswa</h1></div>


        <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
            <tr>
                <th rowspan="3" class="sized"><img src="../images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
                <th class="topleft"></th>
                <td id="tbl-border-top">&nbsp;</td>
                <th class="topright"></th>
                <th rowspan="3" class="sized"><img src="../images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
            </tr>
            <tr>
                <td id="tbl-border-left"></td>
                <td>
                    <!--  start content-table-inner -->
                    <div id="content-table-inner">

                        <table border="0" width="100%" cellpadding="0" cellspacing="0">
                            <tr valign="top">
                                <td>


                                    <!-- start id-form -->
                                    <!-- end step-holder --><!-- start id-form -->
                                    <form action="ubahPrestasi?idPrestasi=${prestasi.idPrestasi}&&status=submit" method="POST" enctype="multipart/form-data"  onsubmit="return validateForm()">
                                        <table id="id-form" border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <th width="130" valign="top">Nama Kegiatan</th>
                                                <td width="395"><input type="text" class="inp-form" name="namaKegiatan" value="${prestasi.namaKegiatan}"/></td>
                                                <td width="270" id="namaKegiatan_error"></td>
                                            </tr>
                                            <tr>
                                                <th width="130" valign="top">Kategori Kegiatan *</th>
                                                <td width="401"><input type="text" class="inp-form" id="kategoriKegiatan" name="kategoriKegiatan"  value="${prestasi.kategoriKegiatan}"/></td>
                                                <td width="270" id="kategoriKegiatan_error"></td>
                                            </tr>
                                            <tr>
                                                <th valign="top">Tahun *</th>
                                                <td>
                                                    <select name="tahun" id="tahun" class="styledselect_form_1">
                                                        <option value="0">-- Pilih Tahun Lomba --</option>
                                                        <option value="2012" <c:if test="${prestasi.tahunPrestasi == '2012'}"> selected="selected" </c:if>>2012</option>
                                                        <option value="2013" <c:if test="${prestasi.tahunPrestasi == '2013'}"> selected="selected" </c:if>>2013</option>
                                                        <option value="2014" <c:if test="${prestasi.tahunPrestasi == '2014'}"> selected="selected" </c:if>>2014</option>
                                                        <option value="2015" <c:if test="${prestasi.tahunPrestasi == '2015'}"> selected="selected" </c:if>>2015</option>
                                                    </select>
                                                </td>
                                                <td id="tahun_error"></td>
                                            <tr>
                                                <th valign="top">Tingkat:</th>
                                                <td>
                                                    <select name="tingkat" value="${prestasi.tingkat}"  class="styledselect_form_1" >
                                                        <option value="0" <c:if test="${prestasi.tingkat == '0'}"> selected="selected" </c:if>>-- Pilih Tingkat Lomba --</option>
                                                        <option value="Lokal" <c:if test="${prestasi.tingkat == 'Lokal'}"> selected="selected" </c:if>>Lokal</option>
                                                        <option value="Nasional" <c:if test="${prestasi.tingkat == 'Nasional'}"> selected="selected" </c:if>>Nasional</option>
                                                        <option value="Provinsi/Regional" <c:if test="${prestasi.tingkat == 'Provinsi/Regional'}"> selected="selected" </c:if>>Provinsi/Regional</option>
                                                        <option value="Internasional" <c:if test="${prestasi.tingkat == 'Internasional'}"> selected="selected" </c:if>>Internasional</option>
                                                    </select>
                                                </td>
                                                <td id="tahun_error"></td>
                                            </tr>

                                            <tr>
                                                <th valign="top">Prestasi Dicapai :</th>
                                                <td><input type="text" class="inp-form" name="prestasiDicapai" value="${prestasi.prestasiDicapai}" /></td>
                                                <td id="prestasiDicapai_error"></td>
                                            </tr>
                                            <tr>
                                                <th valign="top">Keterangan Peserta *</th>
                                                <td>
                                                    <select name="ketPeserta" id="ketPeserta" class="styledselect_form_1" onChange="enableJumlah()">
                                                        <option value="Perorangan" <c:if test="${prestasi.tingkat == 'Perorangan'}"> selected="selected" </c:if>>Perorangan</option>
                                                        <option value="Tim" <c:if test="${prestasi.tingkat == 'Tim'}"> selected="selected" </c:if>>Tim</option>
                                                    </select>
                                                </td><td id="ketPeserta_error"></td>
                                            </tr>                                            
                                            <tr>
                                                <th valign="top">Jumlah Peserta</th>
                                                <td>
                                                    <input type="text" class="inp-form" name="jmlPeserta" id="jmlPeserta" value="1"/>
                                                </td><td id="jmlPeserta_error"></td>
                                            </tr>
                                            <tr>
                                                <th>Upload Sertifikat:</th>
                                                <td><input type="file" class="file_1" name="uploadSertifikat" value="${prestasi.buktiPrestasi}" /></td>
                                                <td><div class="bubble-left"></div>
                                                    <div class="bubble-inner">JPEG,GIF 5MB max perimage</div>
                                                    <div class="bubble-right"></div></td>
                                            </tr>

                                            <tr>  
                                                <th>&nbsp;</th>
                                                <td valign="top">
                                                    <input type="submit" value="" class="form-submit" />
                                                    <input type="reset" value="" class="form-reset"  />		</td>
                                                <td></td>
                                            </tr>
                                        </table>
                                    </form>
                                    <!-- end id-form  -->

                                </td>
                                <td>



                                </td>
                            </tr>
                            <tr>
                                <td><img src="images/shared/blank.gif" width="695" height="1" alt="blank" /></td>
                                <td></td>
                            </tr>
                        </table>

                        <div class="clear"></div>


                    </div>
                    <!--  end content-table-inner  -->
                </td>
                <td id="tbl-border-right"></td>
            </tr>
            <tr>
                <th class="sized bottomleft"></th>
                <td id="tbl-border-bottom">&nbsp;</td>
                <th class="sized bottomright"></th>
            </tr>
        </table>















        <div class="clear">&nbsp;</div>

    </div>
    <!--  end content -->
    <div class="clear">&nbsp;</div>
</div>
<!--  end content-outer -->

<!--  end content-outer -->
<!--  end content-outer........................................................END -->
<%@include file="../footer.jsp"%>
